
package hk.ces.oxfam.patch.result;

import hk.ces.oxfam.patch.obj.Bean;
import hk.ces.oxfam.patch.obj.BeanPacker;
import hk.ces.oxfam.patch.sql.PreparedSQL;
import java.util.Set;

/**
 *
 * @author ReutyCheng
 */
public class BaseBeanSQLResult<T extends Bean> extends BaseBeanResult<T> implements BeanSQLResult<T>
{
  private final SQLResult result;
  
  public BaseBeanSQLResult(SQLResult result, BeanPacker<T> packer)
  {
    super(result.getResultsList(), packer);
    this.result = result;
  }

  public PreparedSQL getPreparedSQL()
  {
    return this.result.getPreparedSQL();
  }

  public Set<String> getTableNames()
  {
    return this.result.getTableNames();
  }

  public int getTableCount()
  {
    return this.result.getTableCount();
  }

  public boolean isTableExist(String tableName, boolean ignoreCase)
  {
    return this.result.isTableExist(tableName, ignoreCase);
  }

  public boolean isColumnExist(String columnName, boolean ignoreCase)
  {
    return this.result.isColumnExist(columnName, ignoreCase);
  }
}
